import request from '@/utils/request'

// 查询秒杀活动列表
export function listKillActivity(query) {
  return request({
    url: '/csmshop/killActivity/list',
    method: 'get',
    params: query
  })
}

// 查询秒杀活动详细
export function getKillActivity(kaId) {
  return request({
    url: '/csmshop/killActivity/' + kaId,
    method: 'get'
  })
}

// 新增秒杀活动
export function addKillActivity(data) {
  return request({
    url: '/csmshop/killActivity',
    method: 'post',
    data: data
  })
}

// 修改秒杀活动
export function updateKillActivity(data) {
  return request({
    url: '/csmshop/killActivity',
    method: 'put',
    data: data
  })
}

// 删除秒杀活动
export function delKillActivity(kaId) {
  return request({
    url: '/csmshop/killActivity/' + kaId,
    method: 'delete'
  })
}
